Wednesday, March 05, 2008

Command-line vi

vi +':g /yyyy/s//xxxx/g' +':wq!' tat

This command will load file "tat" into vi, replace all instances of "yyyy" with "xxxx" then save the file and quit vi... or...

vi +':%s/xxxx/yyyy/g' +':wq!' tat

Apparently "%" in this case is a synonym for "1,$"


No comments:

Oracle Linux virt-manager Error launching create dialog: list index out of range

After a fresh install of Oracle Linux 9.1 and installing virt-manager/virt-install, I tried to create a new virtual machine and got this err...